<template>
  <div class="oldTour" ref="homePage">
    <v-search></v-search>

    <div class="new-item" @click="Jumpbuy()">
      <div class="img-box">
        <img style="width: 100%;display: block;" src="https://resource.sz-trip.com/uploads/20190802/8f29add6eec53173db44a3f7110f5304.jpg" />
        <p class="manyidu">100%满意度</p>
        <p class="price">￥<span style="font-size: 1.1875rem;">330</span>起</p>
      </div>
      <div class="text-box1">
        <p class="title">【阳澄湖大闸蟹】公蟹3~3.4两  母蟹2~2.4两  （5对十只装）</p>
      </div>
      <div class="text-box1">
        <p class="intro">可邮寄或堂食、自取</p>
        <p class="gzd">
          <van-icon name="like" size="14px" color="#46d0ca" />已售 60</p>
      </div>
    </div>

  </div>
</template>

<script>
  import search from '../search.vue'
  export default {
    components: {
      "v-search": search,
    },
    data() {
      return {
        clintHeigth: '', //获取页面高度
      }
    },

    mounted() {
      this.clientHeight = `${document.documentElement.clientHeight}` //document.body.clientWidth;
      // console.log(this.clientHeight);
      // let dd = 100;
      this.$refs.homePage.style.minHeight = this.clientHeight + 'px';
    },
    methods:{
      Jumpbuy() {
        this.$router.push({
          path: "/Home/productDetail",

        })
      },
    }
  }
</script>

<style lang="scss">
  .oldTour {
    .new-item {
      padding: 0.625rem;
      background: white;
      margin-bottom: 0.625rem;

      .img-box {
        position: relative;

        .manyidu {
          position: absolute;
          bottom: 0;
          right: 0;
          left: 0;
          padding: 0.3125rem 0.625rem;
          background: hsla(0, 0%, 49%, .5);
          color: white;
          font-size: 0.6875rem;
        }

        .price {
          display: inline-block;
          padding-left: 0.8125rem;
          padding-right: 0.3125rem;
          height: 1.625rem;
          line-height: 1.625rem;
          background: #46d0ca;
          position: absolute;
          right: 0;
          bottom: 1.9375rem;
          border-top-left-radius: 0.8125rem;
          border-bottom-left-radius: 0.8125rem;
          color: white;
          font-size: 0.5625rem;
        }
      }

      .text-box1 {
        display: flex;
        justify-content: space-between;

        .title {
          color: #3e3e3e;
          font-size: 0.8125rem;
          margin-top: 0.3125rem;
        }

        .intro {
          font-size: 0.625rem;
          color: #747474;
          margin-top: 0.3125rem;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .gzd{
          color: #46d0ca;
          margin-top: 0.3125rem;
          font-size: 0.6875rem;
          text-align: center;
          flex-shrink: 0;
        }
      }
    }
  }
</style>
